<%@page import="monster.comm.util.DateUtil"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="monster.comm.util.Tool"%>
<%@page import="java.net.URLDecoder"%>
<html>
<%
	String path = request.getContextPath(); 
	String now_time=DateUtil.getDate("yyyy-MM-dd");
	String name=Tool.getRequest("name",request); 
	name= URLDecoder.decode(name, "utf-8");
%>

<head>
    <title>个人密码修改</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta http-equiv="imagetoolbar" content="no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <link href="<%=path %>/comm/resources/css/jquery-ui-themes.css" type="text/css" rel="stylesheet">
    <link href="<%=path %>/comm/resources/css/axure_rp_page.css" type="text/css" rel="stylesheet">
    <link href="<%=path %>/comm/person/axurerp_pagespecificstyles.css" type="text/css" rel="stylesheet">
<!--[if IE 6]>
    <link href="主页_files/axurerp_pagespecificstyles_ie6.css" type="text/css" rel="stylesheet">
<![endif]-->
    <script src="<%=path %>/comm/js/data/sitemap.js"></script>
    <script src="<%=path %>/comm/js/jquery-1.7.1.min.js"></script>  
    <script type="text/javascript" src="<%=path %>/comm/plug/my97datepicker/WdatePicker.js"></script>

<script type="text/javascript">
$(function(){
	//initlist(1);
	 
});

function initlist(type){
	
}

function save(){
   
	var name=$("#name").val();
	//var old_password=$("#old_password").val();
	var new_password=$("#new_password").val();
	var re_new_password=$("#re_new_password").val();
	if(new_password==""||new_password==null){
		alert("新密码不能为空!");
		return;
	}
	if(new_password!=re_new_password){
		alert("新密码两次输入不一致!");
		return;
	}
	
	$.post(
		'<%=path%>/comm/jsp/update_password.jsp',
		{
		STAFF_NAME:name,		
		new_password:new_password
		},
		
		function(data){
			
			if(data.id==100){
				alert("修改成功");
				
			}else if(data.id==-200){
				alert("程序异常，请联系管理员!");
			}else if(data.id==101){
				alert("旧密码不正确，不能修改管理员密码");
			}
		},'json'
	);
}
</script>
</head>

<body>   
<div id="main_container">

<div id="u0" class="u0_container"   >
<div id="u0_img" class="u0_normal detectCanvas"></div>
<div id="u1" class="u1" style="visibility:hidden;"  >
<div id="u1_rtf"></div>
</div>
</div>
<input id="u2"  type="password" id="new_password"  class="u2"   value=""  ><!-- new password -->
<!--  
<div id="u3" class="u3"  >
<div id="u3_rtf"><p style="text-align:left;">
	<span style="font-family:Arial;font-size:13px;font-weight:bold;font-style:normal;text-decoration:none;color:#333333;">
		新密码确认</span></p></div>
</div>-->
<INPUT id="u4" type="submit" class="u4" onclick="save()" value="确认"   >

<div id="u5" class="u5"  >
<div id="u5_rtf"><p style="text-align:left;">
	<span style="font-family:Arial;font-size:13px;font-weight:bold;font-style:normal;text-decoration:none;color:#333333;">
		新密码确认</span></p></div>
</div>
<INPUT id="u6" type="password" id="re_new_password" value="" class="u6"     ><!-- old pass_word -->

<INPUT id="u7" type=text id="name" value="<%=name %>" readonly="readonly" class="u7"     ><!-- name -->

<!--  <INPUT id="u8" type="password" id="r_new_password" value="" class="u8"     > r new pass_word  -->

<div id="u9" class="u9"  >
<div id="u9_rtf"><p style="text-align:left;">
	<span style="font-family:Arial;font-size:13px;font-weight:bold;font-style:normal;text-decoration:none;color:#333333;">
		姓名</span></p></div>
</div>
<div id="u10" class="u10"  >
<div id="u10_rtf"><p style="text-align:left;">
	<span style="font-family:Arial;font-size:13px;font-weight:bold;font-style:normal;text-decoration:none;color:#333333;">
		新密码</span></p></div>
</div>
<div id="u11" class="u11"  >
<div id="u11_rtf"><p style="text-align:left;">
	<span style="font-family:Arial;font-size:16px;font-weight:bold;font-style:normal;text-decoration:none;color:#333333;">
		个人密码修改</span></p></div>
</div>
</div>
<div class="preload"><img src="<%=path %>/comm/person/u0_normal.png" width="1" height="1"/></div>
</body>



